package com.zhoux.ty.service.impl;

import com.zhoux.ty.dao.SysNoticeDao;
import com.zhoux.ty.domain.SysNotice;
import com.zhoux.ty.service.SysNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;

/**
 * @author taoyi
 * @version 1.0
 * @date 2021/7/24 16:54
 */

@Service
public class SysNoticeServiceImpl implements SysNoticeService {

    @Autowired
    private SysNoticeDao noticeDao;

    @Override
    public List<SysNotice> selectNotices(SysNotice notice) {
        String tName=Thread.currentThread().getName();
        System.out.println("SysNoticeServiceImpl.selectNotices.thread.name="+tName);
        return noticeDao.selectNotices(notice);
    }

    @Override
    public SysNotice selectById(Long id) {
        //....
        return noticeDao.selectById(id);
    }

    @Override
    public int insertNotice(SysNotice notice) {
        //...
        return noticeDao.insertNotice(notice);
    }

    @Override
    public int updateNotice(SysNotice notice) {
        return noticeDao.updateNotice(notice);
    }

    @Override
    public int deleteById(Long... id) {
        return noticeDao.deleteById(id);
    }
}
